package cn.lingyangwl.agile.member.model.rqrs.address;

import cn.lingyangwl.agile.model.constants.ValidationCons;
import cn.lingyangwl.framework.validation.group.InsertGroup;
import cn.lingyangwl.framework.validation.group.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 会员订单地址
 *
 * @author shenguangyang
 */
@Getter
@Setter
public class AddressBase {
    @NotNull(message = ValidationCons.NOT_EMPTY, groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty(value = "会员id")
    private Long userId;

    @NotEmpty(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "用户姓名")
    private String name;

    @NotEmpty(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "联系人固定电话")
    private String telephone;

    @NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "省id")
    private Long provinceId;

    @NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "市id")
    private Long cityId;

    @NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "区县id")
    private Long regionId;

    @NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "社区id")
    private Long communityId;

    @NotEmpty(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "地址信息")
    private String address;

    @NotEmpty(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
    @ApiModelProperty(value = "详细地址信息")
    private String fullAddress;

    @ApiModelProperty(value = "经度")
    private Double longitude;

    @ApiModelProperty(value = "纬度")
    private Double latitude;

    @NotNull(message = ValidationCons.NOT_EMPTY)
    @ApiModelProperty(value = "地址类型  1 普通地址  2 定位地址")
    private Integer type = 1;
}
